<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
    <title></title>
    <script src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/js/layui.js"></script>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/normalize.css">
    <link rel="stylesheet" href="/static/css/layui.css">
    <link rel="stylesheet" href="/static/css/layui.mobile.css">
    <style>
      @font-face {font-family: "iconfont";
        src: url('/static/css/iconfont.eot?t=1490147664686'); /* IE9*/
        src: url('/static/css/iconfont.eot?t=1490147664686#iefix') format('embedded-opentype'), /* IE6-IE8 */
        url('/static/css/iconfont.woff?t=1490147664686') format('woff'), /* chrome, firefox */
        url('/static/css/iconfont.ttf?t=1490147664686') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
        url('/static/css/iconfont.svg?t=1490147664686#iconfont') format('svg'); /* iOS 4.1- */
      }

      .iconfont {
        font-family:"iconfont" !important;
        font-size:16px;
        font-style:normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
      #containter{width:100%;margin:0 auto;min-width:300px;max-width:420px;}
      #search{width:100%;height:44px;background:#f0f0f0;float:left;}
      #search>div{width:96%;height:36px;margin:4px auto;background:#fff;position:relative;border-radius:5px;}
      #search>div>i{position:absolute;top:6px;left:6px;z-index:99;font-size:24px;color:#ccc;}
      #search>div>input{position:absolute;left:0;top:0;border-style:none;text-align:center;font-size:16px;}
      .mis{width:100%;height:52px;float:left;}
      /*nav*/
      #nav{width:100%;float:left;}
      .nav_list>li{width:33%;}

      /*list*/
      .list{display:block;padding:0;width:100%;}
      .list>li{display:block;width:100%;border-bottom:1px solid #ccc;float:left;padding:0 10px 20px 10px;}
      .list>li>a{display:block;width:100%;}
      .list_title>span{font-size:16px;}
      .list_title>span:nth-child(1){color:rgb(95,196,141);font-weight:800;}
      .list_detail{margin:5px auto;width:100%;}
      .list_detail>span{color:#aaa;font-size:14px;}
      .list_bottom{width:100%;height:50px;margin:0 auto;margin-bottom:5px;}
      .list_bottom>img{width:46px;height:46px;border-radius:25px;margin-top:5px;float:left;}
      .list_bottom>div{width:138px;height:38px;background:rgb(241,157,56);border:1px solid rgb(229,130,48);float:left;text-align:center;line-height:38px;font-size:18px;color:#fff;margin:10px 0 0 20px;border-radius:3px;}
      .list_read{float:right;color:#ccc;margin:20px 0 0 0;}

      /*footer*/
      #foot{width:100%;min-width:300px;max-width:420px;position:fixed;margin:0 auto;bottom:0;height:50px;border-top:1px solid #d0d0d0;background:#fff;}
      #foot>ul{padding:0;display:block;}
      #foot>ul>li{display:block;float:left;width:32%;margin-left:1%;}
      #foot>ul>li>a{display:block;width:100%;}
      .foot_nav{width:42px;height:46px;margin:0 auto;}
      .foot_nav>i{font-size:20px;display:block;width:24px;margin:0 auto;}
      .foot_nav>span{font-size:18px;}
      .foot_nav_select{color:rgb(241,157,56);}
    </style>
</head>
<body>
    <section id="containter">
    <!-- search -->
    <section id="search">
      <div>
        <i class="iconfont">&#xe601;</i>
        <input type="text" name="search" placeholder="请输入关键字" class="form-control">
      </div>
    </section>
    <!-- nav -->
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" id="nav">
          <ul class="layui-tab-title nav_list">
            {foreach $category as $vo}
              <li  {eq name="vo.id" value="$id"} class="layui-this" {/eq}>
                  <a href="{:url('index')}/category/{$vo.id}.html" >{$vo.name}</a>
              </li>
            {/foreach}
          </ul>
          <div class="layui-tab-content" style="padding:0;">
        <!-- 1 -->
            <div class="layui-tab-item layui-show">
            <ul class="list">
                {foreach $data as $vo}
                  <li >
                      <a class="aaa" href='{:url("detail")}/id/{$vo.id}.html'>
                          <div class="list_title">
                            <span>标题：</span>
                            <span>{$vo.title}</span>
                          </div>
                          <div class="list_detail">
                            {eq name="auth" value="1"}<span>{$vo.nickname}</span>{/eq}
                          </div>
                          <div class="list_bottom">
                            <!--<img src="/static/images/111.jpg" alt="">-->
                            {eq name="$vo.job" value="0"}<img src="/static/images/000.jpg" alt="">{/eq}
                            {eq name="$vo.job" value="1"}<img src="/static/images/111.jpg" alt="">{/eq}
                            {eq name="$vo.job" value="2"}<img src="/static/images/222.jpg" alt="">{/eq}
                            {eq name="$vo.job" value="3"}<img src="/static/images/333.jpg" alt="">{/eq}
                            {eq name="$vo.job" value="4"}<img src="/static/images/444.jpg" alt="">{/eq}
                            <div>查看内容</div>
                            <span class="list_read">{$vo.browse}人看过</span>
                          </div>
                      </a>

                </li>
               {/foreach}
            </ul>
        </div>
            <div class="layui-tab-item"></div>
            <div class="layui-tab-item"></div>
          </div>
        </div>

    <div class="mis"></div>
        <footer id="foot">
      <ul>
        <li>
          <a href="{:url('menu')}">
            <div class="foot_nav"><i class="iconfont foot_nav_select">&#xe60c;</i><span class="foot_nav_select">首页</span></div>
          </a>
        </li>
        
        
        <li>
          <a href="{:url('edit',['pid'=>$Request.param.category])}">
            <div class="foot_nav"><i class="iconfont">&#xe6aa;</i><span>发布</span></div>
          </a>
        </li>


        <li>
          <a href="{:url('my')}">
            <div class="foot_nav"><i class="layui-icon">&#xe648;</i><span>我的</span></div>
          </a>
        </li>
      </ul>
    </footer>
    </section>
</body>
<script src="/static/js/jquery.easysearch.js"></script>
<script>
$('input').jSearch({
        selector  : 'ul',
        child : 'li .list_title',
        minValLength: 0,
        Found : function(elem, event){
            $(elem).parent().show();
        },
        NotFound : function(elem, event){
            $(elem).parent().parent().hide();
        },
        After : function(t){
            if (!t.val().length) $('ul li').show();
        }
    });
$('.notice_list li').click(function(event) {
    var url = $(this).attr('data-url');
    location.href = url;
});
</script>

<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
  //Hash地址的定位
  var layid = location.hash.replace(/^#test=/, '');
  element.tabChange('test', layid);

  element.on('tab(test)', function(elem){
    location.hash = 'test='+ $(this).attr('lay-id');
  });

});
</script>

<script>
  var isA = {$a};
    if(isA == 1){
      //li标签样式设置
      $("#foot li:eq(1)").hide();
      $("#foot li:eq(2)").css('float','right'); 
    }
</script>

</html>